import request from '@/utils/request'
import { data } from 'autoprefixer'
export const listReport = (search) => 
    request({
        url: '/report/listAllReport',
        method: 'get',
        params: {
            name: search.name,
            sort: search.sort,
            offset: search.offset,
            limit: search.limit
        }
    })
export const getReport = (id) => 
    request({
        url: '/report/getReport',
        method: 'get',
        params: {
            id:id
        }
    })
export const addReport = (search) => 
    request({
        url: '/report/addReport',
        method: 'post',
        data:search
    })

export const updateReport = (model) => 
    request({
        url: '/report/updateReport',
        method: 'post',
        data:model
    })
    
export const deleteReport = (id) => 
request({
    url: '/report/deleteReport',
    method: 'post',
    params: {
        id:id
    }
})
export const fileUpload = (data) => 
request({
    url: '/report/fileUpload',
    method: 'post',
    data:data,
    headers: {
        'Content-Type': 'multipart/form-data'
    }
})